package com.bl.andr.utillib;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;

/**
 * 拨号相关
 */
public class DialUtil {

    /**
     * 调用系统拨打电话的功能
     * 记得处理 Manifest.Permission.CALL_PHONE 权限
     *
     * @param number 电话号码
     */
    public static void dial(final Activity activity, final String number) {
        Intent intent = new Intent(Intent.ACTION_CALL,
                Uri.parse("tel:" + number.replaceAll("-", "")));
        activity.startActivity(intent);
    }


}
